package com.example.controller.handle;

import com.alibaba.dubbo.config.annotation.Reference;
import com.example.common.api.news.RelyService;
import com.example.common.model.Rely;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @Auther: wyj
 * @Description:登录功能的handler
 */
@Controller
public class CommentController {

    @Reference(version = "1.0.0")
    private RelyService relyService;

    @GetMapping("/loginSer.do")
    public String login(HttpServletRequest request, HttpServletResponse response) throws IOException {
        //从表单中获取数据
        String userid = request.getParameter("userid");

        //调用service层方法
        Rely rely = relyService.queryRely(userid);

        //跳转到new-Comment.html页面
        return "comment";
    }

}
